local rolely_benghuai = fk.CreateSkill {
    name = "rolely_benghuai",
    anim_type = "offensive",
    tags = { Skill.Compulsory }
}
Fk:loadTranslationTable {
    ["rolely_benghuai"] = "崩坏",
    [":rolely_benghuai"] = "锁定技，结束阶段，若你的体力与体力上限不等，你摸两张牌并选择一项：1.失去一点体力，增加一点体力上限；2.减去一点体力上限，回复一点体力。",

    ["dz_losehp"] = "失去体力，增加上限",
    ["dz_changemaxhp"] = "减少上限，回复体力",

    ["$rolely_benghuai1"] = "活在今宵，管什么明日祸乱",
    ["$rolely_benghuai2"] = "掌权长安，我有什么不能做的",

}
rolely_benghuai:addEffect(fk.EventPhaseEnd, {
    can_trigger = function(self, event, target, player, data)
        return target == player and
            player:hasSkill(rolely_benghuai.name) and target == player and player.phase == Player.Finish and
            player.hp ~= player.maxHp
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        player:drawCards(2, rolely_benghuai.name)
        if room:askToChoice(player, { skill_name = rolely_benghuai.name, choices = { "dz_losehp", "dz_changemaxhp" } }) == "dz_losehp" then
            room:loseHp(player, 1, rolely_benghuai.name)
            room:changeMaxHp(player, 1)
        else
            room:changeMaxHp(player, -1)
            room:recover {
                who = player,
                num = 1,
                recoverBy = player,
                skillName = rolely_benghuai.name,
            }
        end
    end,
})
return rolely_benghuai
